#include<stdio.h>
#include<string.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#define one (1<0);
#define two (1<1);
#define three (1<2);
int main()
{
//	FILE * fp = fopen("log.txt","w");
//	const char * message = "hello linux";
//	fwrite(message,strlen(message),1,fp);
//	
//	fclose(fp);
	int pd = open("log.txt",O_WRONLY|O_CREAT|O_APPEND,0666);
	const char * buf = "hello linux";
	write(pd,buf,strlen(buf));
	close(pd);
	return 0;
}
